package com.derbysoft.synxisadapter.commons.log;

import com.derbysoft.synxisadapter.commons.model.Direction;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by: jason
 * Date: 2012-08-30
 */
public final class LogDetailPair {
    private List<Object> otaObjects = new ArrayList<Object>();
    private Direction direction;

    private LogDetailPair(Object otaObject, Direction direction) {
        this.otaObjects.add(otaObject);
        this.direction = direction;
    }

    private LogDetailPair(List<Object> otaObjects, Direction direction) {
        this.otaObjects = otaObjects;
        this.direction = direction;
    }

    public static LogDetailPair build(Object otaObject, Direction direction) {
        return new LogDetailPair(otaObject, direction);
    }

    public static LogDetailPair build(List<Object> otaObjects, Direction direction) {
        return new LogDetailPair(otaObjects, direction);
    }

    public List<Object> getOtaObjects() {
        return otaObjects;
    }

    public void setOtaObjects(List<Object> otaObjects) {
        this.otaObjects = otaObjects;
    }

    public Direction getDirection() {
        return direction;
    }

    public void setDirection(Direction direction) {
        this.direction = direction;
    }
}
